
echo 'running lcchain'
#lcchain-wrapper load 1 60
echo 'LCChain finished: '

ok=`more  ~/Results/LCChain/load1/lcchain.out | grep ok -c`
if [ $ok -eq 1 ] ; then
  echo lcchain ok;
fi;
if [ $ok -eq 0 ] ; then
  echo lcchain was having problems;
fi;

ok=`more  ~/Results/LCChain/load1/lcchain.out | grep F -c`
if [ $ok -ne 0 ] ; then
  echo Failures were found. check log
fi;
cat ~/Results/LCChain/load1/lcchain.out

cd ~/Results/Monitor
mkdir load1
cd load1
year=$(date +%Y)
month=$(date +%m)
day=$(date +%d)
hour=$(date +%H)
minute=$(date +%M)
seconds=$(date +%S)

mv monitor.dat monitor-$year$month$day-$hour$minute$seconds.dat
monitor 
cat error.dat
$num=`wc -l monitor.dat`
echo Monitor of $num doms.


 